package com.bj58.groupbuy.action.service;

import java.util.List;
import java.util.Map;

import com.bj58.groupbuy.action.model.AllianceBillingAttr;
import com.bj58.groupbuy.action.model.AllianceBillingMetrics;
import com.bj58.groupbuy.action.model.AllianceDataSummaryVoForMail;
import com.bj58.groupbuy.action.model.ORKpiTarget;
import com.bj58.groupbuy.wf.page.Paginate;

public interface OnlineRevenueService {
	
	/**查询计费名
	 * @param condition
	 * @param pageNum
	 * @param pageIndex
	 * @return
	 * @throws Exception
	 */
	public Paginate<AllianceBillingAttr>  getAllianceBillingAttrList(String condition,int pageNum,int pageIndex)throws Exception;

	/**增加新计费名
	 * @param vo
	 * @return
	 * @throws Exception
	 */
	public int addNewAllianceBillingAttr(AllianceBillingAttr  vo) throws Exception;
	
	/**更新计费名
	 * @param vo
	 * @return
	 * @throws Exception
	 */
	public int updateAllianceBillingAttr(AllianceBillingAttr  vo) throws Exception;
	
	
	/**根据ID查找
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public AllianceBillingAttr findAllianceBillingAttrById(int id) throws Exception;
	
	
	/**获取联盟名列表
	 * @return
	 * @throws Exception
	 */
	public Map<String,List<String>>  getAllianceList()throws Exception;
	
	
	/**批量插入联盟统计数据
	 * @param abmList  数据
	 * @param source  来源： 58/驾校一点通
	 * @return
	 * @throws Exception
	 */
	public boolean inserABMList(List<AllianceBillingMetrics>  abmList ,String source)throws Exception;
	
	
	/**联盟统计数据  删除旧数据
	 * @param abmList
	 * @return
	 * @throws Exception
	 */
	public boolean deleteABMList(String condition)throws Exception;
	
	
	
	/**获取在线收入汇总数据
	 * @param condition
	 * @return
	 * @throws Exception
	 */
	public List<AllianceDataSummaryVoForMail> ORIncomeData(String condition)throws Exception;
	
	
	/**获取在线收入汇总数据  - 累加数据
	 * @param condition
	 * @return
	 * @throws Exception
	 */
	public List<AllianceDataSummaryVoForMail> ORIncomeSumData(String condition)throws Exception;
	
	
	/**获取在线收入KPI目标
	 * @param condition
	 * @return
	 * @throws Exception
	 */
	public ORKpiTarget getORKpiTarget(String month)throws Exception;
	
	
	/** 删除在线收入日汇总数据
	 * @return
	 * @throws Exception
	 */
	public boolean deleteDaySummary(String startDate,String endDate)throws Exception;
	
	
}
